/**
 */
package org.xtext.mydsl.scheduler.impl;

import java.util.Collection;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.util.EObjectResolvingEList;

import org.xtext.mydsl.scheduler.MesaDebate;
import org.xtext.mydsl.scheduler.Orador;
import org.xtext.mydsl.scheduler.SchedulerPackage;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Mesa Debate</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link org.xtext.mydsl.scheduler.impl.MesaDebateImpl#getLadoA <em>Lado A</em>}</li>
 *   <li>{@link org.xtext.mydsl.scheduler.impl.MesaDebateImpl#getLadoB <em>Lado B</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class MesaDebateImpl extends ActividadImpl implements MesaDebate
{
  /**
   * The cached value of the '{@link #getLadoA() <em>Lado A</em>}' reference list.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getLadoA()
   * @generated
   * @ordered
   */
  protected EList<Orador> ladoA;

  /**
   * The cached value of the '{@link #getLadoB() <em>Lado B</em>}' reference list.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getLadoB()
   * @generated
   * @ordered
   */
  protected EList<Orador> ladoB;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  protected MesaDebateImpl()
  {
    super();
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  protected EClass eStaticClass()
  {
    return SchedulerPackage.Literals.MESA_DEBATE;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EList<Orador> getLadoA()
  {
    if (ladoA == null)
    {
      ladoA = new EObjectResolvingEList<Orador>(Orador.class, this, SchedulerPackage.MESA_DEBATE__LADO_A);
    }
    return ladoA;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EList<Orador> getLadoB()
  {
    if (ladoB == null)
    {
      ladoB = new EObjectResolvingEList<Orador>(Orador.class, this, SchedulerPackage.MESA_DEBATE__LADO_B);
    }
    return ladoB;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public Object eGet(int featureID, boolean resolve, boolean coreType)
  {
    switch (featureID)
    {
      case SchedulerPackage.MESA_DEBATE__LADO_A:
        return getLadoA();
      case SchedulerPackage.MESA_DEBATE__LADO_B:
        return getLadoB();
    }
    return super.eGet(featureID, resolve, coreType);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @SuppressWarnings("unchecked")
  @Override
  public void eSet(int featureID, Object newValue)
  {
    switch (featureID)
    {
      case SchedulerPackage.MESA_DEBATE__LADO_A:
        getLadoA().clear();
        getLadoA().addAll((Collection<? extends Orador>)newValue);
        return;
      case SchedulerPackage.MESA_DEBATE__LADO_B:
        getLadoB().clear();
        getLadoB().addAll((Collection<? extends Orador>)newValue);
        return;
    }
    super.eSet(featureID, newValue);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public void eUnset(int featureID)
  {
    switch (featureID)
    {
      case SchedulerPackage.MESA_DEBATE__LADO_A:
        getLadoA().clear();
        return;
      case SchedulerPackage.MESA_DEBATE__LADO_B:
        getLadoB().clear();
        return;
    }
    super.eUnset(featureID);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public boolean eIsSet(int featureID)
  {
    switch (featureID)
    {
      case SchedulerPackage.MESA_DEBATE__LADO_A:
        return ladoA != null && !ladoA.isEmpty();
      case SchedulerPackage.MESA_DEBATE__LADO_B:
        return ladoB != null && !ladoB.isEmpty();
    }
    return super.eIsSet(featureID);
  }

} //MesaDebateImpl
